package com.android.videotest.activity;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.media2.player.MediaPlayer;

import com.android.videotest.R;

public class Media2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_media2);

        androidx.media2.widget.VideoView videoView = findViewById(R.id.videoView);
        MediaPlayer player = new MediaPlayer(this);
        videoView.setPlayer(player);
    }
}
